<%-- 
    Document   : addcart
    Created on : Mar 11, 2012, 4:40:39 AM
    Author     : maricone
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <%
            response.setHeader("Pragma","no-cache");
            response.setHeader("Cache-Control","no-store");
            response.setHeader("Expires","0");
            response.setDateHeader("Expires",-1);
        %>
        
           <%
        if(session.getAttribute("user")== null){
            response.sendRedirect("index.jsp");
            }

               else{
        %>
        
    </head>
    <body>
        <% out.print("Hi " +session.getAttribute("user")+ "");%>
  <form action="CheckoutServlet1" method="POST">
            <input type="TEXT" name="cost" value= "22">     
            <input type="TEXT" name="customerid" value="1">     
            <input type="submit" value="Checkout" />
        </form>

   <a href="UserLogoutServlet"> Logout </a>
    </body>
    <%
    }
    %>
</html>
